#include "Proxy.h"

void RealSubject::Request()
{
	cout << "Real Request"<<endl;
}

void Proxy::Request()
{
	if(_real_subject == NULL)
	{
		_real_subject = new RealSubject;

		_real_subject->Request();
	}
}

int main()
{
	Proxy *p = new Proxy;

	p->Request();

	delete p;
}
